package com.ktjy.ktmall.entity;

import java.math.BigDecimal;
import java.util.List;

/** 订单实体类，它与t_order订单表对应
 * @version v1.0
 * @Author 郴州科泰
 * @Create 2024-08-06 - 21:22
 */
public class Order {
    private int id;  // 主键id
    private String orderSn;  // 订单的流水号
    private int userId;  // 微信登录用户id
    private WxUser wxUser;
    // 订单状态，1为待付款、2为待发货、3为待收货、4为待评价、5为已完成、6为已取消
    private int orderState;
    private int addressId; // 地址id
    private AddressParams address;  // 地址对象
    private String expressCompany;  // 快递公司
    private String expressNumber;   //快递单号
    private BigDecimal expressCost; // 快递费用
    private BigDecimal orderPrice;  // 商品订单总价
    private BigDecimal actualPrice; // 实际应付金额
    private List<OrderDetail> goods;  // 商品集合[ 商品信息 ]
    private int enabled;   // 删除标识字段(0-未删除 1-已删除)
    private String createTime;
    private String updateTime;



    public Order() {  }

    public Order(int id,String orderSn, int userId, int orderState, BigDecimal orderPrice, BigDecimal actualPrice, String createTime) {
        this.id = id;
        this.orderSn = orderSn;
        this.userId = userId;
        this.orderState= orderState;
        this.orderPrice = orderPrice;
        this.actualPrice = actualPrice;
        this.createTime = createTime;
    }

    public Order(int id,String orderSn, int userId, int addressId, int orderState, BigDecimal orderPrice, BigDecimal actualPrice, String createTime) {
        this.id = id;
        this.orderSn = orderSn;
        this.userId = userId;
        this.addressId = addressId;
        this.orderState= orderState;
        this.orderPrice = orderPrice;
        this.actualPrice = actualPrice;
        this.createTime = createTime;
    }
    public Order(int userId, BigDecimal orderPrice, BigDecimal actualPrice, List<OrderDetail> goods) {
        this.userId = userId;
        this.orderPrice = orderPrice;
        this.actualPrice = actualPrice;
        this.goods = goods;
    }

    public String getExpressCompany() {
        return expressCompany;
    }

    public void setExpressCompany(String expressCompany) {
        this.expressCompany = expressCompany;
    }

    public String getExpressNumber() {
        return expressNumber;
    }

    public void setExpressNumber(String expressNumber) {
        this.expressNumber = expressNumber;
    }

    public BigDecimal getExpressCost() {
        return expressCost;
    }

    public void setExpressCost(BigDecimal expressCost) {
        this.expressCost = expressCost;
    }

    public BigDecimal getOrderPrice() {
        return orderPrice;
    }

    public void setOrderPrice(BigDecimal orderPrice) {
        this.orderPrice = orderPrice;
    }

    public BigDecimal getActualPrice() {
        return actualPrice;
    }

    public void setActualPrice(BigDecimal actualPrice) {
        this.actualPrice = actualPrice;
    }

    public List<OrderDetail> getGoods() {
        return goods;
    }

    public void setGoods(List<OrderDetail> goods) {
        this.goods = goods;
    }

    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    public String getOrderSn() {
        return orderSn;
    }

    public void setOrderSn(String orderSn) {
        this.orderSn = orderSn;
    }

    public int getUserId() {
        return userId;
    }

    public void setUserId(int userId) {
        this.userId = userId;
    }

    public WxUser getWxUser() {
        return wxUser;
    }

    public void setWxUser(WxUser wxUser) {
        this.wxUser = wxUser;
    }

    public int getOrderState() {
        return orderState;
    }

    public void setOrderState(int orderState) {
        this.orderState = orderState;
    }

    public int getAddressId() {
        return addressId;
    }

    public void setAddressId(int addressId) {
        this.addressId = addressId;
    }

    public AddressParams getAddress() {
        return address;
    }

    public void setAddress(AddressParams address) {
        this.address = address;
    }

    public int getEnabled() {
        return enabled;
    }

    public void setEnabled(int enabled) {
        this.enabled = enabled;
    }

    public String getCreateTime() {
        return createTime;
    }

    public void setCreateTime(String createTime) {
        this.createTime = createTime;
    }

    public String getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(String updateTime) {
        this.updateTime = updateTime;
    }
}
